package game.entity.kickstones;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

import game.Game;
import game.GameConstants;
import game.entity.Ball;

public class DoubleStone extends KickStone {

    public DoubleStone(Game gameContainer, float xPos, float yPos, Image img, int moveDirection) {
        super(gameContainer, xPos, yPos, img, moveDirection);
    }

    public DoubleStone(Game gameContainer, float xPos, float yPos, float width, float height, int moveDirection) {
        super(gameContainer, xPos, yPos, width, height, moveDirection, GameConstants.DOUBLESTONE_STANDARDCOLOR);
    }

    public DoubleStone(Game gameContainer, float xPos, float yPos, int moveDirection) {
        super(gameContainer, xPos, yPos, moveDirection, GameConstants.DOUBLESTONE_STANDARDCOLOR);
    }

    public DoubleStone(Game gameContainer, float xPos, float yPos, int moveDirection, Image img) {
        super(gameContainer, xPos, yPos, moveDirection, GameConstants.DOUBLESTONE_STANDARDCOLOR);
    }

    @Override
    public void afterKick(Ball ball) throws SlickException {
        ball.setxSpeed(ball.getxSpeed()*GameConstants.DOUBLESTONE_NEWSPEED_SCALE);
        ball.setySpeed(ball.getySpeed()*GameConstants.DOUBLESTONE_NEWSPEED_SCALE);
        this.gameContainer.addBall(ball.getxPos(), ball.getyPos(), (ball.getxSpeed()*-1), ball.getySpeed());
    }

}
